x86: fixes after emuirq changes
authorKeir Fraser <keir@xen.org>
Mon, 29 Nov 2010 17:44:32 +0000 (17:44 +0000)
committerKeir Fraser <keir@xen.org>
Mon, 29 Nov 2010 17:44:32 +0000 (17:44 +0000)
Signed-off-by: Wei Wang <wei.wang2@amd.com>
xen/arch/x86/irq.c
xen/arch/x86/physdev.c

index fa63de2ab0e23655810a3a5cafde6770292f03b3..3dfe4901e9545dcfd03d79e2e690617f00dae356 100644 (file)
@@ -1860,7 +1860,8 @@ int unmap_domain_pirq_emuirq(struct domain *d, int pirq)
     }
 
     d->arch.pirq_emuirq[pirq] = IRQ_UNBOUND;
-    d->arch.emuirq_pirq[emuirq] = IRQ_UNBOUND;
+    if ( emuirq != IRQ_PT )
+        d->arch.emuirq_pirq[emuirq] = IRQ_UNBOUND;
 
  done:
     return ret;
index 2913a9c1b71ce52313f68718dc2a246fc0515442..5e0bbe174b7a5be7b87cb62b470e55309daaf5f1 100644 (file)
@@ -236,7 +236,8 @@ static int physdev_unmap_pirq(struct physdev_unmap_pirq *unmap)
         spin_lock(&d->event_lock);
         ret = unmap_domain_pirq_emuirq(d, unmap->pirq);
         spin_unlock(&d->event_lock);
-        goto free_domain;
+        if ( unmap->domid == DOMID_SELF || ret )
+            goto free_domain;
     }
 
     ret = -EPERM;